define([
	'request'
], function(request){
	return {
		getRoom: async function(room_id){
			const params = {room_id: room_id}
			return request({
				url: '/ohcard.identify/info',
				params: params
			})
		},
		getCards: function(params){
			return request({
				url: '/ohcard.ohcard/lists',
				params: params
			});
		},
		close: function(id){
			return request({
				url: '/ohcard.identify/close',
				method: 'post',
				data: {id: id}
			})
		},
		identifySelectedSave: function(id, selected){
			return request({
				url: '/ohcard.identify/selectCard',
				method: 'post',
				data: {id: id, selected: selected}
			})
		},
		identifySort: function(id, sort){
			return request({
				url: '/ohcard.identify/setSort',
				method: 'post',
				data: {id: id, sort: sort}
			})
		},
		setStep: function(id, step){
			return request({
				url: '/ohcard.identify/setStep',
				method: 'post',
				data: {id: id, step: step}
			})
		},
		saveAnalysis: function(id, analysis){
			return request({
				url: '/ohcard.identify/setAnalysis',
				method: 'POST',
				data: {id: id, analysis: analysis}
			})
		}
	};
});